Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 3 - Endpoints / Endpoints Reference
Functions / Functions for Connectionless Transaction-Based Endpoints


OTCancelURequest

Cancels a request that was made using the OTSndURequest function.

C INTERFACE
OSStatus OTCancelURequest(EndpointRef ref, OTSequence seq);
C++ INTERFACE
OSStatus Tendpoint::CancelURequest(OTSequence seq);
PARAMETERS
ref
The endpoint reference of the endpoint that has sent the request being cancelled.
seq
A long, specifying the transaction ID of the request you want to cancel. This is the same value as the one you specified for the sequence field of the req parameter when you called the OTSndURequest function.
If you specify 0 for this parameter, Open Transport cancels all outstanding requests. If you specify an invalid sequence number, Open Transport does not do anything.
DESCRIPTION
The OTCancelURequest function cancels the outgoing request whose transaction ID is specified by the seq parameter.

When you call the OTSndURequest function, the provider allocates memory for internal buffers for the transaction. Calling the OTCancelURequest function tells the endpoint provider that you are no longer interested in the transaction and that it can free up any memory or internal buffers associated with the transaction request identified by the seq parameter.

If the function completes successfully, it returns the kOTNoErr result; it does not return any other kind of acknowledgment. It is your responsibility to deallocate memory that you have reserved for the address, options, and data buffers associated with the cancelled OTSndURequest function.

Use the OTCancelURequest function to cancel an outgoing request; use OTCancelUReply to cancel an incoming request.

VALID STATES
T_IDLE

SEE ALSO
You use the OTSndURequest function (page 3-107) to send a request.

You use the OTCancelUReply function (described next) to cancel an
incoming request.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996